#!/bin/bash

matlab -r "out_file = ['/u/yichao/anomaly_compression/condor_data/subtask_compressive_sensing/condor/output/srmf_based_pred.FILENAME.NUM_FRAMES.WIDTH.HEIGHT.GROUP_SIZE.rRANK.periodPERIOD.OPT_SWAP_MAT.OPT_TYPE.OPT_DIM.DROP_ELE_MODE.DROP_MODE.elemELEM_FRAC.lossLOSS_RATE.burstBURST_SIZE.naNUM_ANOM.anomSIGMA_MAG.noiseSIGMA_NOISE.threshTHRESH.seedSEED.txt']; if(exist(out_file)), exit; end; [mse, mae, cc, ratio, tp, tn, fp, fn, precision, recall, f1score, jaccard, gamma, normalized_y, y_val, best_thresh] = srmf_based_pred('INPUT_DIR', 'FILENAME', NUM_FRAMES, WIDTH, HEIGHT, GROUP_SIZE, RANK, PERIOD, 'OPT_SWAP_MAT', 'OPT_TYPE', 'OPT_DIM', 'DROP_ELE_MODE', 'DROP_MODE', ELEM_FRAC, LOSS_RATE, BURST_SIZE, NUM_ANOM, SIGMA_MAG, SIGMA_NOISE, THRESH, SEED); fh = fopen(out_file, 'w'); fprintf(fh, '%f, %f, %f, %f, %d, %d, %d, %d, %f, %f, %f, %f, %f, %f, %f, %f\n', mse, mae, cc, ratio, tp, tn, fp, fn, precision, recall, f1score, jaccard, gamma, normalized_y, y_val, best_thresh); fclose(fh); exit;"
